﻿//-----------------------------------------------------------------------
// <copyright file="ParameterDef.cs" company="tuliprules.org">
//     Copyright (c) 2010 tuplelister, tuliprules.org.
// </copyright>
// <summary>This is the ParameterDef class.</summary>
//-----------------------------------------------------------------------

namespace Tulip.Rules.CodeGen.Models.ClosedWorld
{
    using System.Diagnostics.CodeAnalysis;
    using Engine.Models.ClosedWorld;

    /// <summary>
    /// Definition for parameter passed to member of a generated type.
    /// </summary>
    [SuppressMessage("StyleCop.CSharp.MaintainabilityRules", "SA1401:FieldsMustBePrivate",
        Justification = "Reviewed. Suppression is OK here.")]
    public class ParameterDef
    {
        /// <summary>
        /// The name of the parameter.
        /// </summary>
        public string Name;

        /// <summary>
        /// Indicates if the parameter is passed by reference.
        /// </summary>
        public bool ByRef;

        /// <summary>
        /// Indicates if the direction of the parameter is 'out'.
        /// </summary>
        public bool Out;

        /// <summary>
        /// Indicates if the parameter is the return value.
        /// </summary>
        public bool Return;

        /// <summary>
        /// Indicates if the parameter is a 'params' array.
        /// </summary>
        public bool Params;

        /// <summary>
        /// The name of the parameter type.
        /// </summary>
        public string TypeName;

        /// <summary>
        /// The name of the assembly that houses the parameter type.
        /// </summary>
        public string TypeAssembly;

        /// <summary>
        /// The kind of parameter type.
        /// </summary>
        public TypeKind TypeKind;

        /// <summary>
        /// The visibility of the parameter type.
        /// </summary>
        public TypeVisibility TypeVisibility;

        ///////// <summary>
        ///////// Indicates if the parameter type is static.
        ///////// </summary>
        //////public bool TypeIsStatic;

        /// <summary>
        /// The generic type argument for this parameter.
        /// </summary>
        public string TypeGenericTypeArgument;
    }
}
